
#include "stm32f4xx.h"

#define RUN_LED_PORT    GPIOE
#define RUN_LED_PIN     GPIO_Pin_3

int driv_run_led_init(void)
{
    return 0;
}

int driv_run_led_op(int on_off)
{
    if (on_off > 0) {
        // led on
        GPIO_ResetBits(RUN_LED_PORT, RUN_LED_PIN);
    } else if (on_off == 0) {
        // led off
        GPIO_SetBits(RUN_LED_PORT, RUN_LED_PIN);
    } else {
        // led toggle
        GPIO_ToggleBits(RUN_LED_PORT, RUN_LED_PIN);
    }
    return 0;
}
